<template>
    <div id="reimburseMent">
        <div class="reimburse-header">
            <h2 style="margin-left: 20px">费用报销</h2>
            <ul class="reimburse-header-title">
                <router-link to="/homePageIndex" class="goBack">
                    <li><i class="el-icon-discount"></i> 首页</li>
                </router-link>
                <li>/ 费用报销</li>
            </ul>
            <div class="reimburse-content">
                <p>费 用 报 销 单</p>
                <div class="reimburse-content-table">
                    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="reimburse-ruleForm">
                        <el-form-item label="标题" prop="name" style="display: inline-block; width: 500px; margin-left: 100px;">
                            <el-input v-model="ruleForm.name" style="width: 400px;"></el-input>
                        </el-form-item>

                        <el-form-item label="紧急程度" prop="region" style=" display: inline-block; width: 500px;margin-left: 50px;">
                            <el-select v-model="ruleForm.region" placeholder="请选择紧急程度" style="width: 400px;">
                                <el-option label="正常" value="zhengchang" style="text-align:center;"></el-option>
                                <el-option label="紧急" value="jinji" style="text-align:center;"></el-option>
                            </el-select>
                        </el-form-item>

                        <el-form-item label="提单人员" prop="name" style=" display: inline-block; width: 500px; margin-left: 100px;">
                            <el-input v-model="ruleForm.name" style="width: 400px;"></el-input>
                        </el-form-item>

                        <el-form-item label="证明人" prop="name" style=" display: inline-block; width: 500px; margin-left: 50px;">
                            <el-input v-model="ruleForm.name" style="width: 400px;"></el-input>
                        </el-form-item>

                        <el-form-item label="相关客户" prop="name" style=" display: inline-block; width: 500px; margin-left: 100px;">
                            <el-input v-model="ruleForm.name" style="width: 400px;"></el-input>
                        </el-form-item>

                        <el-form-item label="报销方式" prop="region" style=" display: inline-block; width: 500px;margin-left: 50px;">
                            <el-select v-model="ruleForm.region" placeholder="请选择紧急程度" style="width: 400px;">
                                <el-option label="银行卡" value="yinhangka" style="text-align:center;"></el-option>
                                <el-option label="支票" value="zhipiao" style="text-align:center;"></el-option>
                                <el-option label="支付宝" value="zhifubao" style="text-align:center;"></el-option>
                                <el-option label="微信" value="weixin" style="text-align:center;"></el-option>
                            </el-select>
                        </el-form-item>

                        <el-form-item label="审核人员" prop="name" style=" display: inline-block; width: 500px; margin-left: 100px;">
                            <el-input v-model="ruleForm.name" style="width: 400px;"></el-input>
                        </el-form-item>

                        <el-form-item label="相关票据" prop="name" style=" display: inline-block; width: 500px; margin-left: 50px;">
                            <el-input v-model="ruleForm.name" style="width: 400px;"></el-input>
                        </el-form-item>

                        <el-form-item label="报销事由" prop="desc" style=" display: inline-block; width: 1050px; margin-left: 100px;">
                            <el-input type="textarea" v-model="ruleForm.desc"></el-input>
                        </el-form-item>



                        <el-form-item label="费用日期" required style="display:inline-block; width: 500px; margin-left: 100px;">
                            <el-form-item prop="date">
                              <el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.date" style="width: 400px;"></el-date-picker>
                            </el-form-item>
                        </el-form-item>

                        
                        <el-form-item label="报销金额" prop="name" style=" display: inline-block; width: 500px; margin-left: 50px;">
                            <el-input v-model="ruleForm.name" style="width: 400px;"></el-input>
                        </el-form-item>

                        <el-form-item>
                          <el-button class="baocun" type="primary" @click="submitForm('ruleForm')">保存</el-button>
                          <el-button class="quxiao" @click="resetForm('ruleForm')">取消</el-button>
                        </el-form-item> 

                    </el-form>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: "ReimburseMent",
    data(){
        return{
          ruleForm: {
            name: '',
            region: '',
            date1: '',
            date2: '',
            delivery: false,
            type: [],
            resource: '',
            desc: ''
        },
        rules: {
          name: [
            { required: true, message: '请输入活动名称', trigger: 'blur' },
            { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
          ],
          region: [
            { required: true, message: '请选择活动区域', trigger: 'change' }
          ],
          date1: [
            { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
          ],
          date2: [
            { type: 'date', required: true, message: '请选择时间', trigger: 'change' }
          ],
          type: [
            { type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
          ],
          resource: [
            { required: true, message: '请选择活动资源', trigger: 'change' }
          ],
          desc: [
            { required: true, message: '请填写活动形式', trigger: 'blur' }
          ]
        }
      };
    },
    methods: {
      submitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            alert('submit!');
          } else {
            console.log('error submit!!');
            return false;
          }
        });
      },
      resetForm(formName) {
        this.$refs[formName].resetFields();
      }
    }
  }
</script>

<style scoped>
* {
  margin: 0px;
  padding: 0px;
}
#reimburseMent {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 1270px;
  height: 690px;
  background-color: rgb(230, 230, 230);
}
.reimburse-header {
  position: relative;
  width: 1270px;
  height: 60px;
  line-height: 60px;
  /* background-color: rgb(247, 146, 146); */
}
.reimburse-header-title {
  list-style: none;
}
.goBack {
  text-decoration: none;
}
.reimburse-header .reimburse-header-title li {
  position: relative;
  height: 50px;
  line-height: 50px;
  /* background-color: chartreuse; */
}
.reimburse-header .reimburse-header-title li:nth-child(1) {
  top: -55px;
  left: 1090px;
  width: 60px;
  font-size: 18px;
  color: #080808;
  font-weight: bold;
}
.reimburse-header .reimburse-header-title li:nth-child(1):hover {
  color: #00c0ff;
}
.reimburse-header .reimburse-header-title li:nth-child(2) {
  top: -105px;
  left: 1160px;
  width: 80px;
  font-weight: bold;
  color: gray;
}

.reimburse-content{
    width: 1220px;
    height: 600px;
    position: relative;
    top: -100px;
    left: 20px;
    border: 2px solid rgb(177, 175, 175);
    border-radius: 5px;
    border-top: 5px solid rgb(151, 149, 149);
    background-color: rgb(255, 255, 255);
}
.reimburse-content p{
    /* background-color: gray; */
    height: 100px;
    line-height: 100px;
    font-size: 40px;
    font-family: '宋体';
    text-align: center;
}

.baocun{
    width: 100px;
    height: 40px;
    position: relative;
    top: 10px;
    left: 800px;
}
.quxiao{
    width: 100px;
    height: 40px;
    position: relative;
    top: 10px;
    left: 800px;
}
</style>